package algorithm.leetcode.testcase;

public class TestFinally {

    public static void main(String[] args) {
        System.out.println(getA("3"));
    }

    private static A getA(String score) {
        double s = 0.0;
        try {
            s = Double.parseDouble(score);
        } finally {
            return new A(s, "score");
        }
    }
}



class A {

    double score;
    String name;

    public A(double score, String name) {
        this.score = score;
        this.name = name;
    }

    @Override
    public String toString() {
        return "A{" +
                "score=" + score +
                ", name='" + name + '\'' +
                '}';
    }
}